import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 列表 /ttVsCertificatePost/queryPostRegistrationForFactory
export const queryList = (params) => axios.post(`${SERVER.RETAIL}/ttVsCertificatePost/queryPostRegistrationForFactory`, params)

// 导出 /ttVsCertificatePost/exportPostRegistrationForFactory
export const exportExcel = (params) => axios.post(`${SERVER.RETAIL}/ttVsCertificatePost/exportPostRegistrationForFactory`, params, {
  responseType: 'blob'
})

// 下发 /ttVsCertificatePost/issuePostInfo
export const sendInfo = (params) => axios.post(`${SERVER.RETAIL}/ttVsCertificatePost/issuePostInfo`, params)

// 根据邮寄id查询明细 /ttVsCertificatePost/queryPostInfoById
export const queryInfoById = (params) => axios.post(`${SERVER.RETAIL}/ttVsCertificatePost/checkOpenFastData`, params)


// POST 保存/更新 /ttVsCertificatePost/savePostInfo
export const saveData = (params) => axios.post(`${SERVER.RETAIL}/ttVsCertificatePost/savePostInfo`, params)


// 打印
export const getprinting = (params) => axios.post(`${SERVER.RETAIL}/ttVsCertificatePost/printingOfServiceNotice`, params)
// 上级仓库列表
export const getFactoryWarehouseList = (params) => axios.get(`${SERVER.WHOLESALES}/tmVsSubWarehouse/getWarehouseList`, {
  params
})
// 资金类型接口
export const gettmFiAccountType = (params) => axios.post(`${SERVER.WHOLESALES}/tmFiAccountType/list`, params)

// / 导出
export const exporturl = params => axios.post(`/api/cmscloud.excel/downloadExcel/exportExcel/${params.CODE}`, params);
